package weka.classifiers.trees.IIDT;

import weka.core.Attribute;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.NoSupportForMissingValuesException;

/**
 * @author Sasha
 *
 */
public interface IIDTTree {	

	/**
	 * @return data that reached this node
	 */
	public Instances getExamples();	

	/**
	 * @return subtrees of the node
	 */
	public IIDTTreeClass[] getSuccessors();				

	/**
	 * @return all attributes of the dataset
	 */	
	public Attribute[] getAllAttributes();

	/**
	 * @return attributes that are ancestors of the node
	 */
	public Attribute[] getAncestors();		

	/**
	 * @return number of attributes that are ancestors of the node
	 */
	public int getAncestorsNumber();

	/**
	 * sets the array of attributes that are ancestors of the node
	 */
	public void setAncestors(Attribute[] ancestors);

	/**
	 * @return the node's parent or null if node is the root
	 */
	public IIDTTreeClass getParent();

	/**
	 * sets the node's parent
	 */
	public void setParent(IIDTTreeClass p);

	/**
	 * @return number of times the contract decision tree induction algorithm 
	 * was invoked for the node (as described in "Anytime Learning of Decision
	 * Trees") by Esmeir and  Markovitch
	 */
	public int getLastR();

	/**
	 * set's the number of times the contract decision tree induction algorithm 
	 * was invoked for the node (as described in "Anytime Learning of Decision
	 * Trees") by Esmeir and  Markovitch
	 */
	public void setR(int r);

	/**
	 * @return number of times the contract decision tree induction algorithm 
	 * was invoked for the node (as described in "Anytime Learning of Decision
	 * Trees") by Esmeir and  Markovitch
	 */
	public int getNextR();

	/**
	 * @return number of leaves in the tree rooted by the node
	 */
	public int getNLeaves();

	/**
	 * sets the number of leaves in the tree rooted by the node
	 */
	public void setNLeaves(int n);

	/**
	 * @return number of nodes in the tree rooted by the node (including the node)
	 */
	public int getNNodes();

	/**
	 * @return number of nodes in the tree rooted by the node (including the node)
	 */
	public void setNNodes(int n);

	/**
	 * @return height of the tree rooted by the node
	 */
	public int getHeight();

	/**
	 * @return height of the tree rooted by the node
	 */
	public void setHeight(int height);

	/**
	 * @return height of the tree rooted by the node
	 */
	public double getUnode();

	public double getCostNode();
	
	public Boolean isLeaf();
	
	public Boolean isRoot();
		
	public String toString();

}
